
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Data.SqlClient
Imports System.Text
Imports System.Data
Namespace WorkFlow.BBL
    Public Class EmployeeBBL
        Public Function EMPIsExist(ByVal emp_no As String, ByVal dbName As String) As Boolean
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            Return db1.EMPIsExist(emp_no)
        End Function
        Public Function GetEMP(ByVal emp_no As String, ByVal emp_name As String, ByVal emp_name_eng As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            Return db1.GetEMP(emp_no, emp_name, emp_name_eng)
        End Function
        Public Sub InsertEMP(ByVal emp_no As String, ByVal emp_name As String, ByVal emp_name_eng As String, ByVal ext_no As String, ByVal birthday As String, ByVal org_id As String, ByVal logonid As String, ByVal e_mail As String, ByVal status As String, ByVal come_date As String, ByVal company As String, ByVal quit_date As String, ByVal job_id As String, ByVal sex As String, ByVal UID As String, ByVal Password As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            db1.InsertEMP(emp_no, emp_name, emp_name_eng, ext_no, birthday, org_id, logonid, e_mail, status, come_date, company, quit_date, job_id, sex, UID, Password)
        End Sub
        Public Sub UpdateEMP(ByVal emp_no As String, ByVal emp_name As String, ByVal emp_name_eng As String, ByVal ext_no As String, ByVal birthday As String, ByVal org_id As String, ByVal logonid As String, ByVal e_mail As String, ByVal status As String, ByVal come_date As String, ByVal company As String, ByVal quit_date As String, ByVal job_id As String, ByVal sex As String, ByVal UID As String, ByVal Password As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            db1.UpdateEMP(emp_no, emp_name, emp_name_eng, ext_no, birthday, org_id, logonid, e_mail, status, come_date, company, quit_date, job_id, sex, UID, Password)
        End Sub
        Public Function GetCodeMapping(ByVal TableName As String, ByVal ColumnName As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            Return db1.GetCodeMapping(TableName, ColumnName)
        End Function
        Public Function GetJobData(ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            Return db1.GetJobData()
        End Function
        Public Function GetOrg(ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            Return db1.GetOrg()
        End Function
        Public Function GetCompany(ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.EmployeeDAO = New WorkFlow.DAO.EmployeeDAO(dbName)
            Return db1.GetCompany()
        End Function
    End Class
End Namespace